import request from '@/utils/request'
const serviceName = 'System'

export function queryDepartments(data) {
  return request({
    url: serviceName + '/Department/QueryDepartments',
    method: 'post',
    data
  })
}

export function getDepartment(Id) {
  return request({
    url: serviceName + '/Department/GetDepartment?Id=' + Id,
    method: 'get'
  })
}

export function saveDepartment(data) {
  return request({
    url: serviceName + '/Department/SaveDepartment',
    method: 'post',
    data
  })
}

export function deleteDepartments(data) {
  return request({
    url: serviceName + '/Department/DeleteDepartments',
    method: 'post',
    data
  })
}

export default {
  queryDepartments,
  getDepartment,
  saveDepartment,
  deleteDepartments
}
